//
//  PayTableViewCell.m
//  NewBook
//
//  Created by dlios on 15-3-9.
//  Copyright (c) 2015年 dlios. All rights reserved.
//

#import "PayTableViewCell.h"

@implementation PayTableViewCell
-(void)dealloc
{
    
    [_bookShelfImageView release];
    [_whiteView release];
    [_bookCoverImageView release];
    [_bookNameLable release];
    [_bookReferLable release];
    [_authorname release];
    [_authornameLable release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubViews];
    }
    return self;
}


- (void)createSubViews
{
    //书架图片
    self.bookShelfImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 375, 94)];
    self.bookShelfImageView.image = [UIImage imageNamed:@"2.png"];
    [self.contentView addSubview:self.bookShelfImageView];
    [_bookShelfImageView release];
    //白色底框
    self.whiteView = [[UIView alloc] initWithFrame:CGRectMake(12, 0, 353, 79)];
    self.whiteView.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.whiteView];
    [_whiteView release];
    
    //书的图片
    self.bookCoverImageView = [[UIImageView alloc] initWithFrame:CGRectMake(5, 0, 90, 79)];
    self.bookCoverImageView.backgroundColor = [UIColor whiteColor];
    [self.whiteView addSubview:self.bookCoverImageView];
    [_bookCoverImageView release];
    
    
    //书名
    self.bookNameLable = [[UILabel alloc] initWithFrame:CGRectMake(self.bookCoverImageView.frame.origin.x + self.bookCoverImageView.frame.size.width + 10, self.bookCoverImageView.frame.origin.y, 250, 30)];
    [self.contentView addSubview:self.bookNameLable];
    [_bookNameLable release];
    
    //书的简介
    self.bookReferLable = [[UILabel alloc] initWithFrame:CGRectMake(self.bookCoverImageView.frame.origin.x + self.bookCoverImageView.frame.size.width + 10, self.bookCoverImageView.frame.origin.y + 30, 250, 25)];
    self.bookReferLable.textColor = [UIColor grayColor];
    self.bookReferLable.font = [UIFont systemFontOfSize:14];
    [self.contentView addSubview:self.bookReferLable];
    [_bookReferLable release];
    
    //作者
    self.authorname = [[UILabel alloc] initWithFrame:CGRectMake(self.bookCoverImageView.frame.origin.x + self.bookCoverImageView.frame.size.width + 10, self.bookCoverImageView.frame.origin.y + 55, 40, 25)];
    self.authorname.text = @"作者:";
    self.authorname.textColor = [UIColor grayColor];
    self.authorname.font = [UIFont systemFontOfSize:14];
    [self.contentView addSubview:self.authorname];
    [_authorname release];
    
    //作者名字
    self.authornameLable = [[UILabel alloc] initWithFrame:CGRectMake(self.bookCoverImageView.frame.origin.x + self.bookCoverImageView.frame.size.width + 58, self.bookCoverImageView.frame.origin.y + 55, 200, 25)];
    
    self.authornameLable.textColor = [UIColor grayColor];
    self.authornameLable.font = [UIFont systemFontOfSize:14];
    [self.contentView addSubview:self.authornameLable];
    [_authornameLable release];
    

    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
